/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package ormsamples;

import org.orm.*;
public class CreatePruebaPDS1Data {
	public void createTestData() throws PersistentException {
		PersistentTransaction t = orm.PruebaPDS1PersistentManager.instance().getSession().beginTransaction();
		try {
			orm.DAOFactory lDAOFactory = orm.DAOFactory.getDAOFactory();
			orm.dao.Tda_tipoGasolinaDAO lormTda_tipoGasolinaDAO = lDAOFactory.getTda_tipoGasolinaDAO();
			orm.Tda_tipoGasolina lormTda_tipoGasolina = lormTda_tipoGasolinaDAO.createTda_tipoGasolina();
			// TODO Initialize the properties of the persistent object here, the following properties must be initialized before saving : tdp_preciopre
			lormTda_tipoGasolinaDAO.save(lormTda_tipoGasolina);
			orm.dao.Tdp_precioDAO lormTdp_precioDAO = lDAOFactory.getTdp_precioDAO();
			orm.Tdp_precio lormTdp_precio = lormTdp_precioDAO.createTdp_precio();
			// TODO Initialize the properties of the persistent object here, the following properties must be initialized before saving : tda_tipoGasolina, pre_monto
			lormTdp_precioDAO.save(lormTdp_precio);
			orm.dao.Tcl_logDAO lormTcl_logDAO = lDAOFactory.getTcl_logDAO();
			orm.Tcl_log lormTcl_log = lormTcl_logDAO.createTcl_log();
			// Initialize the properties of the persistent object here
			lormTcl_logDAO.save(lormTcl_log);
			t.commit();
		}
		catch (Exception e) {
			t.rollback();
		}
		
	}
	
	public static void main(String[] args) {
		try {
			CreatePruebaPDS1Data createPruebaPDS1Data = new CreatePruebaPDS1Data();
			try {
				createPruebaPDS1Data.createTestData();
			}
			finally {
				orm.PruebaPDS1PersistentManager.instance().disposePersistentManager();
			}
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
